gtk4.git
5 years agoMerge branch 'a11y/editable' into 'master'
Matthias Clasen [Mon, 19 Oct 2020 20:16:21 +0000 (20:16 +0000)]
Merge branch 'a11y/editable' into 'master'

Improve the accessible support for editables

See merge request GNOME/gtk!2719

5 years agoa11y: Rename some methods
Matthias Clasen [Mon, 19 Oct 2020 16:58:29 +0000 (12:58 -0400)]
a11y: Rename some methods

Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.

5 years agogtk-demo: Set an accessible role
Matthias Clasen [Mon, 19 Oct 2020 16:56:50 +0000 (12:56 -0400)]
gtk-demo: Set an accessible role

Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.

5 years agoMerge branch 'a11y/component' into 'master'
Matthias Clasen [Mon, 19 Oct 2020 16:54:45 +0000 (16:54 +0000)]
Merge branch 'a11y/component' into 'master'

a11y: Implement Component

See merge request GNOME/gtk!2718

5 years agoatspi: Implement Text for more editables
Matthias Clasen [Mon, 19 Oct 2020 16:44:50 +0000 (12:44 -0400)]
atspi: Implement Text for more editables

Our Text implementation requires that we have
a GtkEditable with a delegate that is a GtkText
widget.

This change make the Text implementation work for
the custom widget in the tagged entry demo.

5 years agoUpdate Croatian translation
Goran Vidović [Mon, 19 Oct 2020 16:36:42 +0000 (16:36 +0000)]
Update Croatian translation

(cherry picked from commit fab2558747ace63ee656257f7001f81b3c6b9b49)

5 years agoAdd gtk_editable_get_delegate
Matthias Clasen [Mon, 19 Oct 2020 16:36:54 +0000 (12:36 -0400)]
Add gtk_editable_get_delegate

We need access to the delegate in the a11y layer,
so we might as well make this function public.

5 years agoatspi: Emit bounds-changed
Matthias Clasen [Mon, 19 Oct 2020 15:45:21 +0000 (11:45 -0400)]
atspi: Emit bounds-changed

This is using the new bounds_change vfunc in GtkATContext.

5 years agowidget: Mark the size as changed when it changes
Matthias Clasen [Wed, 14 Oct 2020 01:20:08 +0000 (21:20 -0400)]
widget: Mark the size as changed when it changes

This notifies the AT context that the widgets size
has changed.

5 years agoa11y: Add bounds change api
Matthias Clasen [Mon, 19 Oct 2020 15:33:38 +0000 (11:33 -0400)]
a11y: Add bounds change api

Add a way for GTK to pass bounds change information
to the AT context.

5 years agoatspi: Implement Component
Matthias Clasen [Wed, 14 Oct 2020 01:23:22 +0000 (21:23 -0400)]
atspi: Implement Component

Implement the non-questionable parts of the Component interface
for accessibles which are widgets.

This does not include:
 - global coordinates
 - setters
 - scrolling
 - alpha, layers, zorder, and the like

5 years agoa11y: Add a separate vfunc for platform changes
Matthias Clasen [Mon, 19 Oct 2020 15:19:57 +0000 (11:19 -0400)]
a11y: Add a separate vfunc for platform changes

The state_change vfunc is becoming unwieldy. Lets move
the platform changes to their own vfunc, as a start.

5 years agoatspi: Be more careful
Matthias Clasen [Mon, 19 Oct 2020 15:55:44 +0000 (11:55 -0400)]
atspi: Be more careful

We have non-widget accessibles now, so guard against
change notification being emitted on them.

5 years agoCosmetics
Matthias Clasen [Mon, 19 Oct 2020 16:08:47 +0000 (12:08 -0400)]
Cosmetics

Add some more fold markers.

5 years agoCosmetics
Matthias Clasen [Mon, 19 Oct 2020 16:00:53 +0000 (12:00 -0400)]
Cosmetics

5 years agoCosmetics
Matthias Clasen [Mon, 19 Oct 2020 15:24:09 +0000 (11:24 -0400)]
Cosmetics

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 19 Oct 2020 15:00:17 +0000 (15:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Various columnview fixes

Closes #3265, #3272, and #3276

See merge request GNOME/gtk!2717

5 years agoMerge branch 'msvc' into 'master'
Xavier Claessens [Mon, 19 Oct 2020 13:46:54 +0000 (13:46 +0000)]
Merge branch 'msvc' into 'master'

gdkglcontext: Fix build with MSVC

Closes #3268

See merge request GNOME/gtk!2713

5 years agoMerge branch 'annotations_gtkaboutdialog' into 'master'
Matthias Clasen [Mon, 19 Oct 2020 13:46:32 +0000 (13:46 +0000)]
Merge branch 'annotations_gtkaboutdialog' into 'master'

Add nullable return annotations in GtkAboutDialog

See merge request GNOME/gtk!2712

5 years agoAdd nullable return annotations in GtkAboutDialog
Sophie Herold [Mon, 19 Oct 2020 13:46:32 +0000 (13:46 +0000)]
Add nullable return annotations in GtkAboutDialog

5 years agocolumnview: Make right-aligned content work
Matthias Clasen [Mon, 19 Oct 2020 12:42:33 +0000 (08:42 -0400)]
columnview: Make right-aligned content work

Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5549bfaa4e.

Fixes: #3276
5 years agoAdwaita: Put column separators on the left
Matthias Clasen [Mon, 19 Oct 2020 13:37:20 +0000 (09:37 -0400)]
Adwaita: Put column separators on the left

When resizing columns, we clip a shrunk column
on the right, so the separator disappears in that
case unless we put it on the left side of the other
column.

5 years agogdkglcontext: Fix build with MSVC
Xavier Claessens [Sun, 18 Oct 2020 21:14:22 +0000 (17:14 -0400)]
gdkglcontext: Fix build with MSVC

GLDEBUGPROC callback is defined with APIENTRY which is a windows
specific calling convention. That macro expands to nothing when building
on other platforms.

Fixes: #3268.
5 years agocolumview: Make resize area a bit larger
Matthias Clasen [Mon, 19 Oct 2020 12:22:28 +0000 (08:22 -0400)]
columview: Make resize area a bit larger

This make column resizing feel less like a game
of hit-and-miss. Ultimatively, we should add an
alternative to this.

5 years agocolumview: Implement double-click to reset headers
Matthias Clasen [Mon, 19 Oct 2020 02:34:07 +0000 (22:34 -0400)]
columview: Implement double-click to reset headers

Implement the same behavior as GtkTreeView:
double-click on the header boundary resets the
header to its automatic width.

Fixes: #3272
5 years agocolumnview: Make resize cursors reliable
Matthias Clasen [Mon, 19 Oct 2020 12:28:24 +0000 (08:28 -0400)]
columnview: Make resize cursors reliable

Ensure that the column resize cursor stays in place
for the duration of the resize drag. This is a bit
annoying, since the implicit grab can end up on the
header of a different column from the one we are
resizing, so just set the cursor on all column headers.

5 years agocolumnview: Fix more issues with column resizing
Matthias Clasen [Mon, 19 Oct 2020 12:27:35 +0000 (08:27 -0400)]
columnview: Fix more issues with column resizing

Make it so that for overlapping resize rectangles (with
very narrow columns), we prefer the narrow column, so you
can regrow a column after shrinking it all the way.

Related: #3274

5 years agocolumnview: Fix some issues with column resizing
Matthias Clasen [Mon, 19 Oct 2020 12:25:09 +0000 (08:25 -0400)]
columnview: Fix some issues with column resizing

Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).

Related: #3274

5 years agoinspector: Clear overlays on unroot
Matthias Clasen [Sat, 17 Oct 2020 17:11:58 +0000 (13:11 -0400)]
inspector: Clear overlays on unroot

In dispose(), we can't access the root anymore,
since we're already unrooted.

Fixes: #3265
5 years agoMerge branch 'patch-1' into 'master'
Emmanuele Bassi [Sat, 17 Oct 2020 14:08:29 +0000 (14:08 +0000)]
Merge branch 'patch-1' into 'master'

Add some missing nullable return annotations

See merge request GNOME/gtk!2707

5 years agoAdd some missing nullable return annotations
Sophie Herold [Sat, 17 Oct 2020 13:17:56 +0000 (15:17 +0200)]
Add some missing nullable return annotations

5 years agoMerge branch 'wip/chergert/fix-macos-fps-calculation' into 'master'
Matthias Clasen [Sat, 17 Oct 2020 12:20:04 +0000 (12:20 +0000)]
Merge branch 'wip/chergert/fix-macos-fps-calculation' into 'master'

macos: fix fps calculation for frame timings

See merge request GNOME/gtk!2705

5 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 17 Oct 2020 09:11:24 +0000 (11:11 +0200)]
Update POTFILES.in

5 years agomacos: fix fps calculation for frame timings
Christian Hergert [Fri, 16 Oct 2020 04:04:51 +0000 (21:04 -0700)]
macos: fix fps calculation for frame timings

We need to mark the timings as complete after adding the
presentation time so that we have a valid FPS for the overlay
widget and/or fishbowl demo.

5 years ago3.99.3
Matthias Clasen [Thu, 15 Oct 2020 04:41:52 +0000 (00:41 -0400)]
3.99.3

5 years agoMerge branch 'win32.modal' into 'master'
Matthias Clasen [Fri, 16 Oct 2020 03:01:38 +0000 (03:01 +0000)]
Merge branch 'win32.modal' into 'master'

GDK/Win32: Fix modal window handling and window stacking (for GTK4)

See merge request GNOME/gtk!2675

5 years agodocs: Expand opacity docs
Matthias Clasen [Fri, 16 Oct 2020 02:39:01 +0000 (22:39 -0400)]
docs: Expand opacity docs

Explain the situation with popovers and opacity.

Fixes: #3246
5 years agoMerge branch 'a11y-action-fixes' into 'master'
Matthias Clasen [Fri, 16 Oct 2020 02:19:08 +0000 (02:19 +0000)]
Merge branch 'a11y-action-fixes' into 'master'

A11y action fixes

See merge request GNOME/gtk!2703

5 years agogdk/Win32: Fix mouse pointer capture
Chun-wei Fan [Thu, 8 Oct 2020 07:55:29 +0000 (15:55 +0800)]
gdk/Win32: Fix mouse pointer capture

Call SetCapture() explcitly for the (new) modal window so that we make the
modal window respond to mouse input, and also call SetCapture() to the parent
of the transient window that we are destroying so that mouse input capture is
returned to the parent window.

This attempts to fix the following:

*  Upon creating a new modal window, the new modal window does not receive
   pointer input unless one switches to another program and back

*  Upon closing a transient window, the parent window that activated the
   transient window does not receive pointer input unless one switches to
   another and back

5 years agoMerge branch 'fix-listbox-selection' into 'master'
Matthias Clasen [Fri, 16 Oct 2020 02:03:16 +0000 (02:03 +0000)]
Merge branch 'fix-listbox-selection' into 'master'

Revert "listbox: Activate single-click rows if n_press >= 1"

Closes #3263

See merge request GNOME/gtk!2704

5 years agoGDK W32: Remove stacking functions
Руслан Ижбулатов [Tue, 6 Oct 2020 08:10:47 +0000 (16:10 +0800)]
GDK W32: Remove stacking functions

Stacking functions enforce non-native stacking behaviour that is
mostly unneeded, and doing so introduces bugs and complicates things.

5 years agoRevert "GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied"
Руслан Ижбулатов [Thu, 8 Oct 2020 04:46:06 +0000 (12:46 +0800)]
Revert "GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied"

This reverts commit fc2008f2.

Turns out, we *don't* have code to maintain Z-order. Restacking
code is not doint that, it just enforces a few weird Z-order-related
behaviours.

5 years agoGDK/Win32: Fix modal window handling
Chun-wei Fan [Tue, 6 Oct 2020 07:06:47 +0000 (15:06 +0800)]
GDK/Win32: Fix modal window handling

Make sure that we get the state of the modal window properly, and send out the
corresponding notification signals.

This will ensure that we do not try to activate windows that should have become
inactivated due to it opening modal windows and render the program unresponsive
because we are not activating the correct window that is due to receive user
input.

5 years agoRevert "listbox: Activate single-click rows if n_press >= 1"
Matthias Clasen [Fri, 16 Oct 2020 01:45:34 +0000 (21:45 -0400)]
Revert "listbox: Activate single-click rows if n_press >= 1"

This reverts commit e669433cde60068099c7c03235475673d0ed7db4.

This broke selection in several listbox examples.

Fixes: #3263
5 years agoatspi: Properly filter out parent actions
Matthias Clasen [Fri, 16 Oct 2020 01:29:37 +0000 (21:29 -0400)]
atspi: Properly filter out parent actions

We only want to show relevant, local actions for
widgets, but _gtk_widget_get_action_muxer() will
return the muxer of a parent widget (all the way
up to the toplevel), if the widget does not have
any actions of its own. To detect this situation,
compare what _gtk_widget_get_action_muxer() returns
for the parent widget, and act accordingly.

5 years agoatspi: Fix a thinko in action filtering
Matthias Clasen [Fri, 16 Oct 2020 01:28:11 +0000 (21:28 -0400)]
atspi: Fix a thinko in action filtering

get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.

5 years agoMerge branch 'a11y/atspi-action' into 'master'
Matthias Clasen [Fri, 16 Oct 2020 00:13:23 +0000 (00:13 +0000)]
Merge branch 'a11y/atspi-action' into 'master'

A11y/atspi action

See merge request GNOME/gtk!2699

5 years agoa11y: Add atspi.Action for GtkPasswordEntry
Emmanuele Bassi [Thu, 15 Oct 2020 18:21:27 +0000 (19:21 +0100)]
a11y: Add atspi.Action for GtkPasswordEntry

5 years agoAllow toggling the password entry visibility programmatically
Emmanuele Bassi [Thu, 15 Oct 2020 20:18:35 +0000 (21:18 +0100)]
Allow toggling the password entry visibility programmatically

We are going to need a method for toggling the visibility from the
accessibility layer.

5 years agoa11y: Add atspi.Action for GtkEntry
Emmanuele Bassi [Thu, 15 Oct 2020 18:15:12 +0000 (19:15 +0100)]
a11y: Add atspi.Action for GtkEntry

We need to handle the activation on the entry widget, as well as the
activation of the primary and secondary icons.

5 years agoAdd GtkEntry icon signals emitter
Emmanuele Bassi [Thu, 15 Oct 2020 20:13:19 +0000 (21:13 +0100)]
Add GtkEntry icon signals emitter

We need a (private) way to programmatically trigger the activation of
the entry's icons, so that we can call it from the accessibility layer.

5 years agoa11y: Add atspi.Action for GtkExpander
Emmanuele Bassi [Thu, 15 Oct 2020 15:05:43 +0000 (16:05 +0100)]
a11y: Add atspi.Action for GtkExpander

5 years agoa11y: De-duplicate some action code
Emmanuele Bassi [Thu, 15 Oct 2020 14:55:31 +0000 (15:55 +0100)]
a11y: De-duplicate some action code

The widgets with hard coded actions should share more code, instead of
copy-pasting it.

5 years agoa11y: Special case buttons and switches
Emmanuele Bassi [Wed, 14 Oct 2020 17:42:00 +0000 (18:42 +0100)]
a11y: Special case buttons and switches

These widgets have specific actions.

5 years agoInitial ATSPI Action implementation for widget
Emmanuele Bassi [Wed, 14 Oct 2020 14:10:03 +0000 (15:10 +0100)]
Initial ATSPI Action implementation for widget

Use the actions from the GtkActionMuxer of each widget to populate the
list of actions available.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 21:00:44 +0000 (21:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3245

See merge request GNOME/gtk!2702

5 years agoFix compiler warnings
Matthias Clasen [Thu, 15 Oct 2020 20:33:35 +0000 (16:33 -0400)]
Fix compiler warnings

5 years agoactionmuxer: Make it possible to enumerate local actions
Matthias Clasen [Thu, 15 Oct 2020 20:18:36 +0000 (16:18 -0400)]
actionmuxer: Make it possible to enumerate local actions

This will be useful for exposing actions via the
AT-SPI Actions interface.

Update all callers.

5 years agospinbutton: Hide the buttons from accessibility
Matthias Clasen [Thu, 15 Oct 2020 20:05:02 +0000 (16:05 -0400)]
spinbutton: Hide the buttons from accessibility

The buttons here are not really buttons (the action
is not tied to the "clicked" signal), so triggering
the buttons via a11y does not have the expected effect.

And we expose the Value interface that ATs can use
to set the value.

5 years agoemojicompletion: Avoid a memory overrun
Matthias Clasen [Thu, 15 Oct 2020 19:16:06 +0000 (15:16 -0400)]
emojicompletion: Avoid a memory overrun

Don't read beyond the beginning of the string.

Fixes: #3245
5 years agogtk-demo: Fix some issues with the multi view demo
Matthias Clasen [Thu, 15 Oct 2020 18:41:40 +0000 (14:41 -0400)]
gtk-demo: Fix some issues with the multi view demo

The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.

Fixes: #3257
5 years agoMerge branch 'a11y-list-view-selection-fixes' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 17:36:47 +0000 (17:36 +0000)]
Merge branch 'a11y-list-view-selection-fixes' into 'master'

atspi: Add fold markers

See merge request GNOME/gtk!2701

5 years agoatspi: Add fold markers
Matthias Clasen [Thu, 15 Oct 2020 17:09:13 +0000 (13:09 -0400)]
atspi: Add fold markers

This makes it much easier to navigate in these
multi-implementation files.

5 years agoMerge branch 'a11y-list-view-selection-fixes' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 17:10:00 +0000 (17:10 +0000)]
Merge branch 'a11y-list-view-selection-fixes' into 'master'

A11y list view selection fixes

See merge request GNOME/gtk!2700

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 16:55:19 +0000 (16:55 +0000)]
Merge branch 'ebassi/for-master' into 'master'

GdkWayland API cleanups

Closes #3249

See merge request GNOME/gtk!2688

5 years agoatspi: Implement Selection more correctly
Matthias Clasen [Thu, 15 Oct 2020 16:46:52 +0000 (12:46 -0400)]
atspi: Implement Selection more correctly

The Selection interface is defined in terms of child
positions, so we need to always translate from that
to model positions if we want to use the selection
model apis.

5 years agoRemove debug spew
Matthias Clasen [Thu, 15 Oct 2020 16:19:58 +0000 (12:19 -0400)]
Remove debug spew

5 years agowayland: Make gdk_wayland_device_pad_set_feedback private
Matthias Clasen [Thu, 15 Oct 2020 16:00:00 +0000 (12:00 -0400)]
wayland: Make gdk_wayland_device_pad_set_feedback private

It is not a generally useful api, and awkwardly named.

5 years agodocs: Explain the symbolic icon paintable situation
Matthias Clasen [Thu, 15 Oct 2020 14:08:03 +0000 (10:08 -0400)]
docs: Explain the symbolic icon paintable situation

Add a paragraph to the migration guide that explains
how to properly render symbolic GtkIconPaintables.

Also mention this in the GtkIconPaintable docs.

There's a reason you can't spell 'paintable' without
'pain'...

5 years agoMerge branch 'a11y/atspi' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 14:59:24 +0000 (14:59 +0000)]
Merge branch 'a11y/atspi' into 'master'

A11y/atspi

See merge request GNOME/gtk!2698

5 years agoMerge branch 'clipboard-emo' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 14:50:54 +0000 (14:50 +0000)]
Merge branch 'clipboard-emo' into 'master'

gtk-demo: Fix up image handling in the clipboard demo

Closes #3252

See merge request GNOME/gtk!2697

5 years agoMerge branch 'wip/wayland-dont-respond-to-destroyed-surface-configure' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 14:25:55 +0000 (14:25 +0000)]
Merge branch 'wip/wayland-dont-respond-to-destroyed-surface-configure' into 'master'

wayland/surface: Clear has_uncommitted_ack_configure when hiding

Closes #3262

See merge request GNOME/gtk!2696

5 years agoMerge branch 'meson-epoxy-subproject' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 13:41:47 +0000 (13:41 +0000)]
Merge branch 'meson-epoxy-subproject' into 'master'

meson: Fix error when epoxy is a subproject on Windows

See merge request GNOME/gtk!2695

5 years agogtk-demo: Fix up image handling in the clipboard demo
Matthias Clasen [Thu, 15 Oct 2020 13:16:17 +0000 (09:16 -0400)]
gtk-demo: Fix up image handling in the clipboard demo

Using GtkIconPaintable+GtkPicture is not good for symbolic
icons - they don't get properly colored that way. So change
things around to use the icon name if we have it.

Fixes: #3252
5 years agowayland/surface: Clear has_uncommitted_ack_configure when hiding
Jonas Ådahl [Thu, 15 Oct 2020 12:52:57 +0000 (14:52 +0200)]
wayland/surface: Clear has_uncommitted_ack_configure when hiding

The 'has_uncommitted_ack_configure' state was added to make sure we're
responding to 'xdg_surface.configure' events with
'xdg_surface.ack_configure' requests, as is necessary according to spec.
What we didn't do was to clear this state when hiding, meaning that if
we hid the surface after a configure event, but before the frame
finished and we processed the 'has_uncommitted_ack_configure', we'd try
to acknowledge the surface configuration after having destroyed the
surface.

Closes: #3262
5 years agoatspi: Implement Selection for list views
Matthias Clasen [Thu, 15 Oct 2020 12:35:06 +0000 (08:35 -0400)]
atspi: Implement Selection for list views

This implementation works for both GtkListView and
GtkGridView, and by extension, also for GtkColumnView
and GtkDropDown, since those just use a list view
internally.

5 years agomeson: Fix error when epoxy is a subproject on Windows
Xavier Claessens [Wed, 14 Oct 2020 21:26:23 +0000 (17:26 -0400)]
meson: Fix error when epoxy is a subproject on Windows

epoxy_dep cannot be used in a configure time check when it comes from a
subproject. Use variables set in pc file instead.

This requires https://github.com/anholt/libepoxy/pull/231.

5 years agocolumnview: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 04:09:06 +0000 (00:09 -0400)]
columnview: Set accessible roles

Use the TREE_GRID, ROW, COLUMN_HEADER and GRID_CELL roles
for the various widgets involved in a GtkColumnView. To
enable this, we subclass GtkListView for the internal
list in the column view.

5 years agolistview: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 03:34:51 +0000 (23:34 -0400)]
listview: Set accessible roles

Use the LIST and LIST_ITEM roles for GtkListView
and its children. Use the GRID and GRID_CELL roles
for GtkGridView and its children.

5 years agoDocument accessible roles for stacks and notebooks
Matthias Clasen [Thu, 15 Oct 2020 02:27:09 +0000 (22:27 -0400)]
Document accessible roles for stacks and notebooks

This was forgotten when I implemented the Tabs pattern.

5 years agoflowbox: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 02:18:31 +0000 (22:18 -0400)]
flowbox: Set accessible roles

Use the GRID and GRID_CELL roles for GtkFlowBox
and GtkFlowBoxChild.

5 years agolistbox: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 02:16:00 +0000 (22:16 -0400)]
listbox: Set accessible roles

Use the LIST and LIST_ITEM roles for GtkListBox
and GtkListBoxRow.

5 years agoMerge branch 'wip/chergert/fix-macos-popup-events' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 01:41:42 +0000 (01:41 +0000)]
Merge branch 'wip/chergert/fix-macos-popup-events' into 'master'

macos: fix popup motion and button event delivery

See merge request GNOME/gtk!2694

5 years agoMerge branch 'wip/chergert/gdk-macos-fixes' into 'master'
Matthias Clasen [Thu, 15 Oct 2020 01:41:06 +0000 (01:41 +0000)]
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'

macos: fix crash when displaying a context menu

See merge request GNOME/gtk!2693

5 years agoatspi: Add some docs
Matthias Clasen [Thu, 15 Oct 2020 01:02:02 +0000 (21:02 -0400)]
atspi: Add some docs

Add a comment that explains a few of the more subtle
points of the Atspi context tree contstruction.

5 years agoatspi: Implement Selection for notebook tabs
Matthias Clasen [Thu, 15 Oct 2020 00:52:33 +0000 (20:52 -0400)]
atspi: Implement Selection for notebook tabs

This is a bit different from the way things were done
in GTK 3 - we follow what was done for GtkStackSwitcher,
and make the tab bar carry the GTK_ACCESSIBLE_TAB_LIST
role, and implement Selection there.

5 years agonotebook: Set accessible roles and properties
Matthias Clasen [Wed, 14 Oct 2020 23:06:46 +0000 (19:06 -0400)]
notebook: Set accessible roles and properties

Set up the necessary roles, relations and properties
for the tab patterns. This parallels what we have done
for GtkStackSwitcher, and implements the Tabs pattern
as described in the ARIA authoring guidelines.

5 years agoatspi: Don't crash on unnamed stack pages
Matthias Clasen [Wed, 14 Oct 2020 23:05:36 +0000 (19:05 -0400)]
atspi: Don't crash on unnamed stack pages

GtkNotebook creates unnamed stack pages, and we should
not crash when that happens.

5 years agogizmo: Add a way to set accessible role
Matthias Clasen [Wed, 14 Oct 2020 22:37:14 +0000 (18:37 -0400)]
gizmo: Add a way to set accessible role

This will be used for some of the gizmo used
inside GtkNotebook.

5 years agoatspi: Implement Selection for GtkStackSwitcher
Matthias Clasen [Wed, 14 Oct 2020 05:06:04 +0000 (01:06 -0400)]
atspi: Implement Selection for GtkStackSwitcher

5 years agostackswitcher: Set up relations and states
Matthias Clasen [Wed, 14 Oct 2020 04:25:57 +0000 (00:25 -0400)]
stackswitcher: Set up relations and states

Set up a CONTROLS relation between each tab button
and its page, and update the SELECTED property of
the buttons to match their active state.

5 years agostackswitcher: Use the tablist and tab roles
Matthias Clasen [Wed, 14 Oct 2020 04:18:02 +0000 (00:18 -0400)]
stackswitcher: Use the tablist and tab roles

Set the tablist role on the stackswitcher itself, and
the tab role on the buttons. This is another step towards
implementing the tabs pattern for GtkStack.

5 years agoaccessible: Avoid realizing the context prematurely
Matthias Clasen [Wed, 14 Oct 2020 04:16:23 +0000 (00:16 -0400)]
accessible: Avoid realizing the context prematurely

platform change is called from gtk_widget_set_focusable
which is likely to be called early on in init(). We don't
want to create an AT context that early if we can help
it, e.g. since it makes it impossible to override the
accessible-role with a construct property.

5 years agostack: Turn pages into accessibles
Matthias Clasen [Wed, 14 Oct 2020 03:44:50 +0000 (23:44 -0400)]
stack: Turn pages into accessibles

This requires some cleanup to remove assumptions
about accessibles being widgets in the backend,
and some code to navigate the tree with these
extra objects in between widgets.

The accessibles for stack pages have the role
GTK_ACCESSIBLE_ROLE_TAB_PANEL. This is the first
step towards implementing the tabs patterns
as described in the aria authoring guidelines
for GtkStack.

5 years agomacos: fix discover of surface under cursor
Christian Hergert [Wed, 14 Oct 2020 23:59:38 +0000 (16:59 -0700)]
macos: fix discover of surface under cursor

This was incorrectly reporting the toplevel surface instead of the
popup surface that was placed above it. This fixes event delivery
to popups for selecting menu items and more.

5 years agomacos: only emit popup-layout-changed after initial present
Christian Hergert [Wed, 14 Oct 2020 23:26:52 +0000 (16:26 -0700)]
macos: only emit popup-layout-changed after initial present

Otherwise we risk being re-entrant where GtkPopover will not have a
GdkPopupLayout causing other issues.

5 years agomacos: ensure we have access to a GdkMonitor
Christian Hergert [Wed, 14 Oct 2020 23:26:14 +0000 (16:26 -0700)]
macos: ensure we have access to a GdkMonitor

5 years agoMerge branch 'wip/chergert/gdk-macos-fixes' into 'master'
Matthias Clasen [Wed, 14 Oct 2020 23:04:03 +0000 (23:04 +0000)]
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'

macos: fix button release events outside of window during grabs

See merge request GNOME/gtk!2692

5 years agomacos: allow pointer release event outside surface coords
Christian Hergert [Wed, 14 Oct 2020 22:42:45 +0000 (15:42 -0700)]
macos: allow pointer release event outside surface coords

This helps with grab situations so that we can end it when releasing
the pointer buttons outside of the window coordinates.

5 years agomacos: break grabs after sending release event
Christian Hergert [Wed, 14 Oct 2020 22:31:29 +0000 (15:31 -0700)]
macos: break grabs after sending release event